//
//  AboutViewController.m
//  HQJFacilitator
//
//  Created by mymac on 2016/11/1.
//  Copyright © 2016年 Fujian first time iot technology investment co., LTD. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()
@property (nonatomic,strong)UIWebView *WebView;
//@property (nonatomic,strong)UIView *opaqueView;
//@property (nonatomic,strong)UIActivityIndicatorView *activityIndicatorView;
@end

@implementation AboutViewController



- (void)viewDidLoad {
    [super viewDidLoad];

    self.WebView = [[UIWebView alloc]initWithFrame:self.view.bounds];
//    self.WebView.userInteractionEnabled = YES;
    [self.WebView setOpaque:NO];//opaque是不透明的意思
    [self.WebView  setScalesPageToFit:YES];//自动缩放以适应屏幕
    self.WebView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.WebView];
    
    NSURL *url = [NSURL URLWithString:self.urlWebStr];
    [self.WebView loadRequest:[NSURLRequest requestWithURL:url]];
    //2.加载本地文件资源
    /* NSURL *url = [NSURL fileURLWithPath:filePath];
     NSURLRequest *request = [NSURLRequest requestWithURL:url];
     [webView loadRequest:request];*/
    //3.读入一个HTML，直接写入一个HTML代码
    //NSString *htmlPath = [[[NSBundle mainBundle]bundlePath]stringByAppendingString:@"webapp/loadar.html"];
    //NSString *htmlString = [NSString stringWithContentsOfURL:htmlPath encoding:NSUTF8StringEncoding error:NULL];
    //[webView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:htmlPath]];
    
//    self.opaqueView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
//    self.activityIndicatorView = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
//    [self.activityIndicatorView setCenter:self.opaqueView.center];
//    [self.activityIndicatorView setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
//    [self.opaqueView setBackgroundColor:[UIColor blackColor]];
//    [self.opaqueView setAlpha:0.6];
//    [self.view addSubview:self.opaqueView];
//    [self.opaqueView addSubview:self.activityIndicatorView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
